//
//  PPCircleMsgTableViewCell.m
//  pet
//
//  Created by 陈无忌 on 1/5/15.
//  Copyright (c) 2015 whalefin. All rights reserved.
//

#import "PPCircleMsgTableViewCell.h"

@implementation PPCircleMsgTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)configCellWithPushMsg:(PPCirclePush *)circlePush
{
    [self.topicImg setContentMode:UIViewContentModeScaleAspectFill];
    [self.topicImg setClipsToBounds:YES];
    
    PPTopicImage *img = circlePush.topic.topicImgList.firstObject;
    [self.pubAvatar setImageWithURL:[PPImageUrl getImageUrl:circlePush.pubUser.userAvatar] placeholderImage:[UIImage imageNamed:@"defaultAvatar"] usingActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
    [self.topicImg setImageWithURL:[PPImageUrl getImageUrlOriginal:img.img] placeholderImage:[UIImage imageNamed:@"defaultImage"] usingActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
    self.pubName.text = circlePush.pubUser.userName;
    self.msgLabel.text = circlePush.msg;
    self.time.text = circlePush.pubTime;
}

@end
